package com.jdy.haoduoaiteacher.fragment;

import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;

import org.droidparts.Injector;

/**
 * 
 * @author hufei
 * 
 */
public class BaseFragment extends Fragment implements OnClickListener {
  private boolean injected;
  protected Context mContext;

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mContext = getActivity();
  }

  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
      Bundle savedInstanceState) {

    View view = onCreateView(savedInstanceState, inflater, container);
    Injector.inject(view, this);
    injected = true;
    return view;
  }

  public View onCreateView(Bundle savedInstanceState, LayoutInflater inflater,
      ViewGroup container) {
    return super.onCreateView(inflater, container, savedInstanceState);
  }

  public final boolean isInjected() {
    return injected;
  }

  @Override
  public void onClick(View v) {
    
  }
}
